Replication code and data
Authors: Taylor C. Boas, F. Daniel Hidalgo, and Guillermo Toral. 
Paper: "Competence versus Priorities: Negative Electoral Responses to Education Quality in Brazil"
Contact email: gtoral@mit.edu.
Date: June 19, 2020

These files replicate the analyses corresponding to the regression discontinuity design. The file "rdd_dataset.R" builds the dataset. The file "rdd_functions.R" installs a user-defined function necessary for creating the RD plots in the paper. The file "rdd_analyses.R" performs the analyses.

The main dataset is "rdd_dataset.csv". That file and all data files used to build it are in the data subfolder. Users can either start replicating analyses (executing the code in rdd_functions.R and rdd_analyses.R, which imports "rdd_dataset.csv"), or start by building the dataset from scratch using rdd_dataset.R.